package com.aya.provider;

import com.alibaba.dubbo.rpc.RpcException;
import com.aya.service.DemoModel;
import com.aya.service.DemoService;
import com.aya.service.exp.RiverException;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @date: Created in 17:59 2018/10/8
 */
@Service
public class DemoAServiceImpl implements DemoService {

    //    @GET
//    @Path("{id : \\d+}")
//    @Produces({PageAttributes.MediaType.APPLICATION_JSON})
    @Override
    public String sayHello(String demoModel) {
        System.out.println(demoModel + " say hello!");
        return "version A hello";
    }

    @Override
    public String throwExp(DemoModel name) {
        System.out.println(name);
        throw new RpcException("run exp");
    }

    @Override
    public void sayStr(String name) {
        System.out.println(name + " say str!");
    }
}
